<script>
// import api from 'API';
const modal = weex.requireModule('modal');
const deviceHeight = 750 / weex.config.env.deviceWidth * weex.config.env.deviceHeight;
export default {
    data() {
        return { deviceHeight }
    },
    computed: {
        sections() {
            let data = this.$store.state.home.tabsData[0];
            return data ? data.tab_data.sections : {};
        }
    }
}
</script>
<template>
    <scroller class="scroller" :style="{'height':deviceHeight-400}">
        <div class="sections" v-for="(item,$index) in sections" :key="$index">
            <cellsAutoFill v-if="item.view_type==='cells_auto_fill'" :list="item.body.items"></cellsAutoFill>
            <listTwoType1 v-else-if="item.view_type ==='list_two_type1'" :list="item.body.items"></listTwoType1>
            <listOneType2 v-else-if="item.view_type ==='list_one_type2'" :data="item.body.items[0]"></listOneType2>
            <listOneType3 v-else-if="item.view_type ==='list_one_type3'" :data="item.body.items[0]"></listOneType3>
            <dividerLine v-else-if="item.view_type==='divider_line'" :line="item.body"></dividerLine>
            <listBroadcast v-else-if="item.view_type==='list_broadcast'" :data="item.body"></listBroadcast>
            <listActionTitle v-else-if="item.view_type==='list_action_title'" :list="item.body.items"></listActionTitle>
            <horizontalScrollView v-else-if="item.view_type==='horizontal_scroll_view'" :list="item.body.items"></horizontalScrollView>
            <swiper v-else-if="item.view_type === 'gallery_540'" :list="item.body.items"></swiper>
        </div>
    </scroller>
</template>
<style scoped>

</style>

